import {Form, Input, InputNumber, Radio, Select, Switch, TreeSelect} from "antd";
import {useEffect, useState} from "react";
import { message } from "antd";

const DeviceForm = ({record, formRef}) => {
  
  return (
    <>
          <Form.Item
        label="网关名"
        name="name"
        rules={[
          {
            required: true,
            message: '请输入网关名',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入网关名' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="Host"
        name="host"
        rules={[
          {
            required: true,
            message: '请输入Host',
          }, {type: 'string', max: 32}
        ]}
      >
        <Input placeholder='请输入Host' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="TcpPort"
        name="tcpPort"
        rules={[
          {
            required: true,
            message: '请输入TcpPort',
          }
        ]}
      >
        <InputNumber min={1024} max={65535} placeholder='请输入TcpPort' autoComplete="off"/>
      </Form.Item>

      <Form.Item
        label="UdpPort"
        name="udpPort"
        rules={[
          {
            required: true,
            message: '请输入UdpPort',
          }
        ]}
      >
        <InputNumber min={1024} max={65535} placeholder='请输入UdpPort' autoComplete="off"/>
      </Form.Item>
    </>
  );

}

export default DeviceForm;